﻿<UserControl x:Class="ReSharper.Exceptional.Settings.Views.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="urn:schemas-jetbrains-com:jetbrains-ui-controls" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <TabControl Margin="0,8,0,0">
        <TabItem Header="General">
            <StackPanel Margin="8">
                <controls:CheckBoxDisabledNoCheck2 Content="Delegate invocations may throw System.Exception" Margin="0,0,0,12" 
                                                   x:Name="DelegateInvocationsMayThrowExceptions" />

                <TextBlock Text="Documentation of thrown exception's subtype is sufficient..." FontWeight="Bold" Margin="0,0,0,4" />
                <controls:CheckBoxDisabledNoCheck2 Content="... for throw statements" Margin="0,0,0,4" 
                                                   x:Name="IsDocumentationOfExceptionSubtypeSufficientForThrowStatements" />
                <controls:CheckBoxDisabledNoCheck2 Content="... for method or property invocations" Margin="0,0,0,12" 
                                                   x:Name="IsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions" />

                <TextBlock Text="Method and property visibility" FontWeight="Bold" Margin="0,0,0,4" />
                <controls:CheckBoxDisabledNoCheck2 Content="Inspect public methods and properties" x:Name="InspectPublicMethods" Margin="0,0,0,4" />
                <controls:CheckBoxDisabledNoCheck2 Content="Inspect internal methods and properties" x:Name="InspectInternalMethods" Margin="0,0,0,4" />
                <controls:CheckBoxDisabledNoCheck2 Content="Inspect protected methods and properties" x:Name="InspectProtectedMethods" Margin="0,0,0,4" />
                <controls:CheckBoxDisabledNoCheck2 Content="Inspect private methods and properties" x:Name="InspectPrivateMethods" Margin="0,0,0,8" />
            </StackPanel>
        </TabItem>
        <TabItem Header="Optional exceptions">
            <Grid Margin="8">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <StackPanel>
                    <TextBlock Text="Define exception types which are shown as hints instead of warnings. " Margin="0,0,0,16" />
                    <controls:CheckBoxDisabledNoCheck2 Content="Use predefined optional exceptions" 
                                                       x:Name="UseOptionalExceptionsDefaults" Margin="0,0,0,8" />
                    <Button Content="Show predefined optional exceptions" Margin="0,0,0,8" Padding="4"
                            Click="ShowPredefinedOptionalExceptions" />
                </StackPanel>
                <TextBox Grid.Row="1" x:Name="OptionalExceptions" AcceptsReturn="True" 
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                         ScrollViewer.VerticalScrollBarVisibility="Auto" />

                <TextBlock Grid.Row="2" Text="Format: ExceptionType,[Always|InvocationOnly|ThrowOnly]" Margin="0,8,0,0" />
            </Grid>
        </TabItem>
        <TabItem Header="Optional method and property exceptions">
            <Grid Margin="8">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <StackPanel>
                    <TextBlock Text="Define exceptions that are thrown from methods or properties which are shown as hints instead of warnings. " 
                               Margin="0,0,0,16" />

                    <controls:CheckBoxDisabledNoCheck2 Content="Use predefined optional method and property exceptions" 
                                                       x:Name="UseOptionalMethodExceptionsDefaults" Margin="0,0,0,8"/>
                    <Button Content="Show predefined optional method and property exceptions" Margin="0,0,0,8" Padding="4"
                            Click="ShowPredefinedOptionalMethodAndPropertyExceptions" />
                </StackPanel>
                <TextBox Grid.Row="1" x:Name="OptionalMethodExceptions" AcceptsReturn="True" 
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                         ScrollViewer.VerticalScrollBarVisibility="Auto"  />

                <TextBlock Grid.Row="2" Text="Format: FullMethodOrPropertyPath,ExceptionType" Margin="0,8,0,0" />
            </Grid>
        </TabItem>
        <TabItem Header="Accessor overrides">
            <Grid Margin="8">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <StackPanel>
                    <TextBlock Text="Override the property accessors for thrown exceptions of existing types. " Margin="0,0,0,16" />
                    <controls:CheckBoxDisabledNoCheck2 Content="Use predefined accessor overrides" 
                                                       x:Name="UseDefaultAccessorOverrides" Margin="0,0,0,8"/>
                    <Button Content="Show predefined accessor overrides" Margin="0,0,0,8" Padding="4"
                            Click="ShowPredefinedAccessorOverrides" />
                </StackPanel>
                <TextBox Grid.Row="1" x:Name="AccessorOverrides" AcceptsReturn="True" 
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                         ScrollViewer.VerticalScrollBarVisibility="Auto"  />

                <TextBlock Grid.Row="2" Text="Format: FullPropertyPath,ExceptionType,[get|set]" Margin="0,8,0,0" />
            </Grid>
        </TabItem>
    </TabControl>
</UserControl>
